package com.extremelylargepackage;

import com.extremelylargepackage.SchmupView.EngineType;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class LevelSelectActivity extends Activity
{
	private SchmupView _view;
	
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		_view = new SchmupView(this, null);
		setContentView(_view);
		_view.getThread().startEngine(EngineType.levelSelect, false);
	}
	
    public void onConfigurationChanged(Configuration newConfig) 
    {
        super.onConfigurationChanged(newConfig);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }
    
    @Override
    public void onPause()
    {
    	super.onPause();
    	_view.getThread().pauseGame();
    	_view.getThread().setVisible(false);
    }
    
    @Override
    public void onResume()
    {
    	super.onResume();
    	_view.getThread().resumeGame();
    	_view.getThread().setVisible(true);
    }
}
